
import axios from 'axios';

/**
 * 关注店铺
 */
export class FollowStoreService {
    // 分页查询列表
    static findFollowStores (queryParams) {
        return axios({
            url: '/mall/merchant/FollowStore/findFollowStores',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的关注店铺
    static findFollowStore (followStoreId) {
        const query = {
            followStoreId
        }
        return axios({
            url: '/mall/merchant/FollowStore/findFollowStore',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的关注店铺(包含外键名称)
    static findFollowStoreForView (followStoreId) {
        const query = {
            followStoreId
        }
        return axios({
            url: '/mall/merchant/FollowStore/findFollowStoreForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的关注店铺(包含外键名称)
    static findFollowStoreForEdit (followStoreId) {
        const query = {
            followStoreId
        }
        return axios({
            url: '/mall/merchant/FollowStore/findFollowStoreForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的关注店铺(只提取ID 和 Name)
    static findFollowStoresWithIdNameById (followStoreId) {
        const query = {
            followStoreId
        }
        return axios({
            url: '/mall/merchant/FollowStore/findFollowStoresWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询关注店铺集合(只提取ID 和 Name)
    static findFollowStoresWithIdNameByName (followStoreName) {
        const query = {
            followStoreName
        }
        return axios({
            url: '/mall/merchant/FollowStore/findFollowStoresWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存关注店铺
    static saveFollowStore (followStore) {
        const query = {}
        return axios({
            url: '/mall/merchant/FollowStore/saveFollowStore',
            method: 'POST',
            params: query,
            data: followStore
        });
    }

    //修改保存关注店铺
    static updateFollowStore (followStore) {
        const query = {}
        return axios({
            url: '/mall/merchant/FollowStore/updateFollowStore',
            method: 'POST',
            params: query,
            data: followStore
        });
    }

    //根据ID查询指定的关注店铺(只提取ID 和 Name)
    static deleteFollowStore (followStoreId) {
        const query = {
            followStoreId
        }
        return axios({
            url: '/mall/merchant/FollowStore/deleteFollowStore',
            method: 'POST',
            params: query,
        });
    }
}
